<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
nav{
    background-color: red;
}
.a1{
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 500px;
    height: 400px;
    background-color: yellow;
    z-index: 99;
    /* //层次 */
   
}


.a1>h3{
    background-color: green;
}
.a2{
    position: fixed;
    /* 固定布局 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0,.3);
}
</style>
<body>
    <nav>菜单菜单</nav>
    <div class="a1">
<h3>标题</h3>
    </div>
    <div class="a2"></div>
    <img style="margin-top: 3000px;" src="./imgs/hnkz.jpg" alt="">
    <p style="margin-top: 3000px;">dkdjssjdjlsjdsjdsl</p>
</body>
</html>